<style>

    .mainPanel{
        padding: 10px 0;
        width:100%;
        height:300px;
        float:left;
    }
    
    .userWarehousePanel{
        width:600px;
        height:100%;
        display:block;
        float:left;
        border:solid 1px #ededed;
    }
    
</style>

<div class="pageContent">
    <form method="post"
        action="${rc.getContextPath()}/manage/userWarehouse/saveUserWarehouse"
        class="pageForm required-validate"
        onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent" >
            <input type="hidden" name="navTabId" value="${navTabId!''}">
            <input type="hidden" name="id"
                value="<#if (userWarehouse[0].warehouseCode)??>${userWarehouse[0].warehouseCode!''}</#if>">
            <fieldset>
                <dl>
                    <dt><@label key="userCode.C,colon">用户编号：</@label></dt>
                    <dd>
                        <input name="userCode" value="${userWarehouse[0].userCode!''}" 
                              size="22" type="text" maxlength="20" class="required  alphanumeric toUp" 
                               id="userWarehouseLookup.userCode"
                              postField="userCode" suggestFields="userCode,userText" 
                              suggestUrl="${rc.getContextPath()}/manage/user/userSuggest" lookupGroup="userWarehouseLookup"
                              remote="${rc.getContextPath()}/manage/user/checkedUserCodeNotExits"
                              warn="<@label key='userCode.C,doesNotExist.C'>用户编号不存在</@label>"
                              <#if userWarehouse[0]??>
                                  readonly="readonly"
                              <#else>
                                  remote="${rc.getContextPath()}/manage/user/userSuggest"
                             </#if>
                        />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="userText.C,colon">用户描述：</@label></dt>
                    <dd>
                        <input name="userText"
                            value="${userWarehouse[0].userText!''}" id="userWarehouseLookup.userText"
                            size="22" type="text" maxlength="60" class="required" 
                              readonly="readonly"
                          />
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="WarehouseCode.C,colon">仓库编号：</@label></dt>
                    <dd>
                        <input name="warehouseCode" value="${userWarehouse[0].warehouseCode!''}" readonly="readonly"/>
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="WarehouseText.C,colon">仓库描述：</@label></dt>
                    <dd>
                        <input name="warehouseText" value="${userWarehouse[0].warehouseText!''}" readonly="readonly"/>
                    </dd>
                </dl>
                <dl>
                    <dt><@label key="moveType.C,colon">移动类型：</@label></dt>
                </dl>
                <div class="mainPanel">
                    <div id="moveTypeSelect" class="userWarehousePanel">
                        <ul id="tree" class="tree treeFolder treeCheck expand readonly">
                            <#if moveTypeMap??&&(moveTypeMap?size) gt 0>
                                 <#list moveTypeMap?keys as key>
                                        <li>
                                            <a>${eCodesMap[key]}</a> 
                                            <ul>
                                              <#list moveTypeMap[key] as mt>
                                                <li>
                                                    <a tvalue="${mt.moveTypeCode}" tname="moveTypeCodes"
                                                    <#if userWarehouse??&&(userWarehouse?size) gt 0>
                                                        <#list userWarehouse as uw>
                                                            <#if uw.moveTypeCode==mt.moveTypeCode>
                                                                checked="true" 
                                                            </#if>
                                                        </#list>
                                                    </#if>
                                                    >${mt.moveTypeCode}-${mt.moveTypeText}</a> 
                                                </li>
                                              </#list>
                                            </ul>
                                     </li>                 
                                 </#list>
                            </#if>
                        </ul>
                    </div>
                  </div>
                </dl>
            </fieldset>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                                <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script>

var dialog=$.pdialog.getCurrent();

$("a[name='warehouse']",dialog).click(function()
{
    var $warehouseCode=$("input[name='warehouseCode']",dialog)
    $warehouseCode.val($(this).attr("tvalue"));
});
        

</script>
